package com.test.p11flyweight.example02;

public class Client01 {
    public static void main(String[] args) {

        ChessFlyweight black = ChessFlyweightFactory.getChess("black");
        ChessFlyweight black2  = ChessFlyweightFactory.getChess("black");
        System.out.println(black);
        System.out.println(black2);

        System.out.println("增加外部状态");

        black.dispaly(new Coordinate(10,10));
        black2.dispaly(new Coordinate(20,29));

        System.out.println(black);
        System.out.println(black2);
    }
}
